package proyecto.tools;

import android.content.Context;
import android.content.SharedPreferences;

public class Preferences {

	
	
	public static long getPreferenceMine(Context c, String pref){
		SharedPreferences settings = c.getSharedPreferences("nombre"/*PREFERENCES_NAME*/, 0);
		//PREFERENCES_NAME es un xml
		long value = settings.getLong(pref, 0);
		
		return value;
	}
	
	public static void setPreferenceMine(Context c, String pref, long value){
		
		SharedPreferences settings = c.getSharedPreferences("nombre", 0);
		//PREFERENCES_NAME es un xml
		SharedPreferences.Editor editor = settings.edit();
		editor.putLong(pref, value);
		
		//Don't forget to commit your edits!!
		
		editor.commit();
	}
	
	
}